public class Tank {
    Tank(int x, int y) {
        this.x = x;
        this.y = y;
    }
    private int x;
    private int y;
    private int speed=10;
    private int direction;
    private int type;
    private boolean life=true;

    public boolean isLife() {
        return life;
    }

    public void setLife(boolean life) {
        this.life = life;
    }

    public int getDirection() {
        return direction;
    }

    public void setDirection(int direction) {
        this.direction = direction;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }
    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }
    public void up(){//0
        setY(this.getY()-this.getSpeed());
    }
    public void left(){//1
        setX(this.getX()-this.getSpeed());
    }
    public void right(){//2
        setX(this.getX()+this.getSpeed());
    }
    public void down(){//3
        setY(this.getY()+this.getSpeed());
    }


}
